1. Field of the Invention
This invention generally relates to an encoding and decoding method and, more particularly, to an encoding and decoding method for a microdot matrix.
2. Description of the Related Art
Please refer to FIG. 1, it shows a conventional handwriting recognition system including a read/write medium 91 and a scanning device 92. A microdot matrix, which includes a plurality of visually negligible position codes 911, is formed on the read/write medium 91.
Please refer to FIGS. 2a and 2b, each position code 911 generally includes a header region 9111 and a data region 9112, wherein microdots 9113 distributed with different combinations and permutations are formed in the data region 9112 of every position codes 911 whereas microdots 9113 distributed in a fixed combination and permutation are formed in the header region 9111 of every position codes 911. In FIG. 2b, the microdots 9113 included in the position code 911 shown in FIG. 2a are replaced by the binary bits, i.e. positions with a microdot 9113 therein are replaced with the binary bit “1” and positions without a microdot 9113 therein are replaced with the binary bit “0”.
The scanning device 92 has an image sensor 921 for fetching images of the position codes 911. In this manner, a user may utilize the scanning device 92 to write on the read/write medium 91, and a processing unit will compare the image of the data region 9112 of the position code 911 fetched by the image sensor 921 with a data base so as to recognize a current position and motion of the scanning device 92. However, the conventional handwriting recognition system has at least following problems: (1) A large memory space is required to store all position codes 911 on a microdot matrix for being compared with the fetched images by a processing unit; and (2) The image sensor 921 has to fetch an image including at least one complete position code 911 at any moment for image comparison, and thus the image sensor 921 requires a larger sensor array. However, these system requirements will increase the system cost of a handwriting recognition system.
Accordingly, the present invention provides an encoding and decoding method for a microdot matrix that performs the encoding and decoding based on Reflected Gray Codes so as to reduce system requirements and to eliminate the position ambiguity during decoding process.